package com.sky.wsp.rabbitmq.consumer;

import com.sky.wsp.rabbitmq.exchange.FanoutExchangeConfig;
import com.sky.wsp.rabbitmq.po.MqMessage;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;


@Component
public class FanoutConsumer2 {
    @RabbitListener(queues = FanoutExchangeConfig.QUEUE_NAME_2)
    public void subscribe(MqMessage msg) {
        System.out.println("<==Fanout消费者2收到消息" + msg);
    }
}
